﻿namespace WebRole1
{
	using System;
	using System.IO;

	using Microsoft.WindowsAzure.ServiceRuntime;

	public partial class _Default : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			string path;

			if (RoleEnvironment.IsAvailable)
			{
				//I'm on Azure
				path = RoleEnvironment.GetLocalResource ( "myLocalStorage" ).RootPath;
			}
			else
			{
				path = "C:\\Temp\\";
				//I'm on premise
			}

			Directory.CreateDirectory ( path + "\\WPC" );

			myPath.Text = path;
		}
	}
}
